package com.suyl.annotationdemo.core.validator;

import org.springframework.util.StringUtils;

/**
 * @author : suyl
 * @version : v1.0.0
 * @date : 2020/3/20 15:02
 * @descr : 自定义验证类
 */
public class PersonValidator implements Validator {

    @Override
    public String valid(Object value) {
        if (!StringUtils.isEmpty(value) && value.equals("suyl"))
            return null;
        return "名字不一致";
    }
}
